package com.poker.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.poker.base.Result;
import com.poker.dao.CardMapper;
import com.poker.entity.Card;
import com.poker.service.CardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CardServiceImpl implements CardService {


    @Autowired
    private CardMapper cardMapper;

    @Override
    public Result<List<Card>> queryValues() {
        return Result.success(cardMapper.selectList(new QueryWrapper<Card>().lambda().eq(Card::getColour,"hearts").likeLeft(Card::getId,"_1").orderByAsc(Card::getNumber)));
    }
}
